import { setState, addControlPoint, userImgNotSelectAttr } from './common';
G6.registerNode('user-none-node', {
  draw(cfg, group) {
    let { node_height, node_width } = cfg.custom_info || {};
    node_height = Number(node_height);
    node_width = Number(node_width);
    const rect = group.addShape('image', {
      name: 'user-node',
      attrs: {
        img: userImgNotSelectAttr.img,
        height: node_height,
        width: node_width
      }
    });
    addControlPoint(group, cfg);
    return rect;
  },
  setState(name, value, item) {
    setState({ name, value, item, node_name: 'user-node' });
  }
});
